<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdPlaceList.aspx.cs" Inherits="SelectAdPlace" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>广告管理</title>
<link rel="stylesheet" href="../skin/style.css" type="text/css" />
<script type="text/javascript" src="../../js/jquery-cn.js"></script>
<script type="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("span.hao123 :checkbox").click(function(){
        var r=$("span.hao123 :checkbox").attr("checked");
        if(r){
            $(":checkbox").attr("checked","checked");
        }else{
            $(":checkbox").removeAttr("checked","checked");
        }
    });
    
    $("#Btn_deletAll").click(function(){
        return confirm('你确认要删除吗?');
    });
});

function did(){
    var a=confirm("你确定要删除吗？");
    return a;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="itemtitle">
 <h3>广告位搜索</h3>
</div>
<div class="itemtitle_tect">
 <p>广告位名称：
   <asp:TextBox ID="TxB_Name" runat="server" Width="180px"></asp:TextBox>
   &nbsp;广告位类型：
   <asp:DropDownList ID="TxB_Type" runat="server" Width="156px">
     <asp:ListItem Text="全部广告" Value=" "></asp:ListItem>
	 <asp:ListItem Text="全屏浮动显示" Value="全屏浮动显示"></asp:ListItem>
	 <asp:ListItem Text="对联式广告" Value ="对联式广告"></asp:ListItem>
	 <asp:ListItem Text="普通显示" Value="普通显示"></asp:ListItem>
	 <asp:ListItem Text="全屏渐影消失" Value="全屏渐影消失"></asp:ListItem>
	 <asp:ListItem Text="上下浮动显示-左" Value="上下浮动显示-左"></asp:ListItem>
	 <asp:ListItem Text="上下浮动显示-右" Value ="上下浮动显示-右"></asp:ListItem>
	</asp:DropDownList>
   <%--<asp:TextBox ID="TxB_Type" runat="server" Width="180px"></asp:TextBox>--%>&nbsp;<asp:Button ID="Button5" runat="server" Text="搜索" OnClick="Button5_Click" CssClass="i_button" /></p>
</div>
<div class="clr"></div>
<div class="partition">
  <div class="Option">
                <span><strong>快捷操作</strong></span>
                <span class="pl"><a href="AdPlaceAdd.aspx">添加广告位</a></span>
  </div>
  </div>
<div class="clr"></div>
<div class="talbe_border">
  <asp:GridView ID="GridView1" runat="server" AllowPaging="false" AutoGenerateColumns="false" OnRowCommand="GridView1_RowCommand" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" GridLines="None" CssClass="talbe_list" OnRowDataBound="GridView1_RowDataBound">
   <Columns>
   <asp:TemplateField>
      <ItemTemplate>
          <asp:CheckBox ID="ckb_Ad" runat="server"/>
     </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="广告ID">
        <ItemTemplate>
            <asp:Label ID="lblID" runat="server" Text='<%#Eval("T_ID")%>'></asp:Label>
        </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="广告位名称">
   <ItemTemplate>
	   <asp:LinkButton ID="Lb_Name" runat="server" Text='<%#Eval("Ad_Name") %>' CommandArgument='<%#Eval("T_ID")%>' CommandName="Issue"></asp:LinkButton>
   </ItemTemplate>
   </asp:TemplateField>
   
   <asp:TemplateField HeaderText="广告类型">
   <ItemTemplate>
   <asp:Label ID="Lb_Type" runat="server" Text='<%#Eval("Ad_Type")%>'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="显示页面">
   <ItemTemplate>
   <asp:Label ID="Lb_page" runat="server" Text='<%#Eval("Ad_Page")%>'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="广告规格">
   <ItemTemplate>
   <asp:Label ID="Lb_Width" runat="server" Text='<%#Eval("Ad_Width ")%>'></asp:Label><asp:Label ID="Label1" runat="server" Text="×"></asp:Label><asp:Label ID="Lb_Height" runat="server" Text='<%#Eval("Ad_Height")%>'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="广告价格">
   <ItemTemplate>
   <asp:Label ID="Lb_money" runat="server" Text='<%#Eval("DayMoney","{0:c}")%>'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="图片链接地址" Visible="false">
   <ItemTemplate>
	  <asp:Label ID="Lb_ImageAdrees" runat="server" Text='<%#Eval("Ad_ImageAdrees")%>'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="广告链接地址" Visible="false">
   <ItemTemplate>
	<asp:Label ID="Lb_Adrees" runat="server" Text='<%#Eval("Ad_Adrees")%>'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="按钮">
   <ItemTemplate>
	<asp:LinkButton ID="btn_edit" runat="server" Text="编辑" CommandName ="select"></asp:LinkButton>
   <asp:LinkButton ID="btn_delet" runat="server" Text="删除"  CommandName="delet" CommandArgument='<%#Eval("T_ID")%>' OnClientClick="return did();"></asp:LinkButton>
   <asp:LinkButton ID="LinkButton1" runat="server"  CommandArgument='<%#Eval("T_ID")%>' Text="调用JS代码" CommandName="JsUrl" ></asp:LinkButton>
   </ItemTemplate>
   </asp:TemplateField>
   <asp:TemplateField HeaderText="广告位ID" Visible="false">
   <ItemTemplate>
	   <asp:Label ID="Lb_ID" runat="server" Text='<%#Eval("T_ID")%>'></asp:Label>
   </ItemTemplate>
   </asp:TemplateField>
   </Columns>
   <HeaderStyle CssClass="header" />
   </asp:GridView>
   <div class="Paging">
    <p>
        <uc1:PageNo ID="PageNo1" runat="server" />
  </p>
  <asp:CheckBox ID="Ckbox" runat="server" Text="全选" CssClass="hao123"/>
    <asp:Button ID="Btn_deletAll" runat="server" Text="批量删除" OnClick="Btn_deletAll_Click" CssClass="i_button" />
    <asp:Label ID="lblMessage" runat="server" Visible="false"></asp:Label>
   </div>
</div>
</form>
</body>
</html>
